<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人订单管理</title>

	<link rel="stylesheet" href="<%=basePath %>css/common_new.min.css">
    <link rel="stylesheet" href="<%=basePath %>static/css/owl.carousel.min.css">
    <link rel="stylesheet" href="<%=basePath %>css/dingdan.css">
    <script src="<%=basePath %>static/js/jquery.min.js"></script>
    <script src="<%=basePath %>static/js/owl.carousel.js"></script>
    <script src="<%=basePath %>js/dingdan.js"></script>
    <script type="text/javascript" src="<%=basePath%>static/layer/2.4/layer.js"></script>
    <link rel="stylesheet" href="<%=basePath %>static/layer/2.4/skin/layer.css">
    
    
    <!-- 顶部登录 -->
	<script rel="script" src="<%=basePath%>js/vue.min.js"></script>
	<link rel="stylesheet"
		href="//at.alicdn.com/t/font_699355_5fafq7zsd2fq1tt9.css">
	<link rel="stylesheet" href="<%=basePath%>css/index.css">
</head>


<body>
    <!-- 顶部导航栏 -->
    <section>
        <div id="header">
            <jsp:include page="yeah-top.jsp" />
        </div>
	 <input type="hidden" value="${ul }" id="ul"/>
     <div class="row">
        <div class="daohang">
            <ul>
            	<a href="<%=basePath %>"><li class="li" style="color: #FCDB00;">耶主页</li></a>
                <li class="li1">购物车</li>
                <li class="li2">购买商品</li>
                <li class="li3">回收商品</li>
                <li class="li4">租赁商品</li>
                <li class="li5">竞价商品</li>
                <li class="li6">企业回收</li>
            </ul>
        </div>
        <script type="text/javascript">
        	function buy(){
        		var buy=false;
        		$("input[name='a']").each(function(){
        			if($(this).is(':checked')){
        				$("input[name='a']").each(function(){
                			if(!$(this).is(':checked')){
                				var a=$(this).parents("tr").find(".div5").remove();
                			}
                		});
        				buy=true;
            			return false;
        			}	
        		});
        		return buy;
        		
        		
        	}
        </script>
        <form action="sellitemorder" method="post" onsubmit="return buy()">
	        <div class="daohang1">
	           <div class="daohang1_1">
	            <table width="1200px" class="table" cellspacing="0">
	            	<thead>
	            		<tr style="height: 150px;">
	            			<th><input type="checkbox" name="b" id="all" style="height: 20px; width :20px;position: absolute;margin-left: -9px;margin-top: -9px"><span style="font-size: 16px;position: absolute;margin-left: 20px;margin-top: -11px">全选</span></th>
	            			<th>图片</th>
	            			<th>机型</th>
	            			<th>配置</th>
	            			<th>价格</th>
	            			<th>数量</th>
	            			<th>总价</th>
	            			<th>操作</th>
	            		</tr>
	            	</thead>
	            	<tbody>
	            		<c:forEach items="${map.pageinfoshopt.list }" var="shopt">	            			
		            		<tr style="height: 150px">
		            			<th><input type="checkbox" name="a" style="height: 20px; width :20px;"></th>
		            			<th><a href="sellitemparticulars?i_id=${shopt.i_id }"><img src="${shopt.filePath }" alt="" style="height: 100px;width: 100px"></a></th>
		            			<th>${shopt.title }</th>
		            			<th>${shopt.colormemory }</th>
		            			<th>￥<fmt:formatNumber value="${shopt.price }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></th>
		            			<th>${shopt.mun }</th>
		            			<th>￥<fmt:formatNumber value="${shopt.price*shopt.mun }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></th>
		            			<th><h3 style="font-size: 16px;cursor: pointer;" onclick="deleshopt(${shopt.stid },this)">删除</h3></th>
		            			<th class="div5">
				                   <input type="hidden" value="${shopt.stid }" name="stid"/>
					               <input type="hidden" value="${shopt.i_id }" name="i_id"/>
					               <input type="hidden" value="${shopt.cfid }" name="cfid"/>
					               <input type="hidden" value="${shopt.title }" name="title"/>
					               <input type="hidden" value="${shopt.filePath }" name="filePath"/>
					               <input type="hidden" value="${shopt.mun }" name="mun"/>
		                   		</th>
		            		</tr>	
		            	</c:forEach>
	            	</tbody>
	            	<tfoot>
	            		<tr>
	            			<td colspan="8">
	            				<div class="qwer">
						            <a href="javascript:return false;"
										style="font-weight: bold; cursor: default; background-color: #ccff66;margin-left: 460px">共${map.pageinfoshopt.pages }页</a>
						            <a href="javascript:return false;"
										style="font-weight: bold; cursor: default; background-color: #ccff66">第${map.pageinfoshopt.pageNum }页</a>
									<c:choose>
										<c:when test="${map.pageinfoshopt.pageNum==1||map.pageinfoshopt.pageNum==0}">
											<a href="javascript:return false;"
												style="font-weight: bold;background-color: #fcdb00;">上一页</a>
										</c:when>
										<c:otherwise>
											<a href="order?pageNum=${map.pageinfoshopt.prePage}&ul=1"
												style="font-weight: bold;background-color: #fcdb00;">上一页</a>
										</c:otherwise>
									</c:choose>
									<c:choose>
										<c:when test="${map.pageinfoshopt.pageNum==map.pageinfoshopt.pages}">
											<a href="javascript:return false;"
												style="font-weight: bold;background-color: #fcdb00;">下一页</a>
										</c:when>
										<c:otherwise>
											<a href="order?pageNum=${map.pageinfoshopt.nextPage}&ul=1"
												style="font-weight: bold;background-color: #fcdb00;">下一页</a>
										</c:otherwise>
									</c:choose>
					            </div>
	            			</td>
	            		</tr>
	            	</tfoot>
	            </table>
	           </div> 
	           <button type="submit" class="but1">立即购买</button>
	        </div><br style="clear: both;"/>
        </form>
        <div class="daohang2">
            <div class="daohang2_1">
                <ul>
                	<c:forEach items="${map.pageinfosellorder.list }" var="sellorder">
                		<div class="oneorder">
		                    <li>
		                        <p class="p1">
		                            <span class="span1"><fmt:formatDate value="${sellorder.createtime }" pattern="yyyy-MM-dd HH:mm:ss" /></span>
		                            <span class="span2">订单号：${sellorder.oid }</span>
		                            <span style="color: #ccc">物流单号：</span><span class="span2" style="margin-left: 0px;cursor: pointer;" onclick="logistics('物流信息','logistics?logisticCode=',this)">${sellorder.logisticCode }</span>
		                            <span class="span2" style="color: red;">总价：<fmt:formatNumber value="${sellorder.payment }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></span>
		                            <c:if test="${sellorder.status==1||(sellorder.logisticCode!=null&&sellorder.logisticCode!='') }">
		                            	<button type="button" class="but3" onclick="deleorder('${sellorder.oid }',this)">删除订单</button>
		                            </c:if>
		                            <c:if test="${sellorder.status==1 }">
				                    	<a href="nonpayment_pay?oid=${sellorder.oid }&payments=${sellorder.payment }"><button type="button" class="but2">去付款</button></a>
				                    </c:if>
		                        </p>
		                        <c:forEach items="${sellorder.item_order }" var="item_order">
			                        <li>
				                        <div class="shangpin">
				                            <div class="shangpin1">
				                                <a href="sellitemparticulars?i_id=${item_order.i_id }"><img src="${item_order.filePath }" alt=""></a>
				                            </div>
				                            <div class="shangpin2">
				                                <p style="font-size: 16px">${item_order.title }</p>
				                            </div>	                          
				                            <div class="shangpin5">
				                                <p>配置：${item_order.colormemory }</p>
				                            </div>
				                            <div class="shangpin5">
				                                <p>单价：￥<fmt:formatNumber value="${item_order.price }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
				                            </div>
				                            <div class="shangpin5">
				                                <p>数量：${item_order.mun }</p>
				                            </div>
				                            <div class="shangpin3">
				                                <p>合计：￥<fmt:formatNumber value="${item_order.price*item_order.mun }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
				                            </div>
				                            <c:if test="${(sellorder.logisticCode==null||sellorder.logisticCode=='')&&(sellorder.status==2) }">
				                            	<div class="shangpin4" style="font-size: 16px">
				                            		未发货
				                            	</div>
				                            </c:if>			                            
				                            <c:if test="${(sellorder.status==2)&&(sellorder.logisticCode!=null&&sellorder.logisticCode!='') }">
					                            <div class="shangpin4">
					                                <button id="bot" class="bot">评价</button>(文本框右下角可拖动)
					                                <div id="ping" class="ping">
					                                    <textarea rows="" cols="" name="evaluate"></textarea>
					                                    <button id="pingjia" class="pingjia" onclick="sellpingjia(${item_order.i_id },${item_order.cfid },this)">确定</button>
					                                </div>
					                            </div>
					                       </c:if>
				                        </div>
				                	</li>
		                        </c:forEach>	                        
		                    </li>
	                    </div>
	                </c:forEach>  
                </ul>
            </div>
            <div class="qwer">
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66;margin-left: 460px">共${map.pageinfosellorder.pages }页</a>
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66">第${map.pageinfosellorder.pageNum }页</a>
				<c:choose>
					<c:when test="${map.pageinfosellorder.pageNum==1||map.pageinfosellorder.pageNum==0}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfosellorder.prePage}&ul=2"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${map.pageinfosellorder.pageNum==map.pageinfosellorder.pages}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfosellorder.nextPage}&ul=2"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:otherwise>
				</c:choose>
            </div>  
        </div>
        <div class="daohang3">
            <div class="daohang3_1">
                <ul>
                	<c:forEach items="${map.pageinfobackorder.list }" var="backorder">
	                    <li>
	                        <p class="p1">
	                            <span class="span1"><fmt:formatDate value="${backorder.createtime }" pattern="yyyy-MM-dd HH:mm:ss" /></span>
	                            <span class="span2">订单号：${backorder.oid }</span>
	                            <c:if test="${backorder.back_way==3}">	
	                            	<span style="color: #ccc;margin-left: 40px">物流单号：</span><span class="span2" style="margin-left: 0px;cursor: pointer;" onclick="logistics('物流信息','logistics?logisticCode=',this)">${backorder.logisticCode }</span>
	                            </c:if>
	                            <c:if test="${backorder.back_way==4&&(backorder.logisticCode==null||backorder.logisticCode=='')}">
	                            	<span>	
	                            		<button id="sellogisticCode" type="button" class="but2" style="float: none;width: 120px;background-color: #ccff66" onclick="zld_edit('添加快递单号','zlkedit?oid=${backorder.oid }','${backorder.oid }',this)">填写快递单号</button>
	                            	</span>
	                            </c:if>
	                            <c:if test="${backorder.back_way==4&&(backorder.logisticCode!=null&&backorder.logisticCode!='')}">	
	                            	<span style="color: #ccc;margin-left: 40px">物流单号：</span><span class="span2" style="margin-left: 0px;cursor: pointer;" onclick="logistics('物流信息','logistics?logisticCode=',this)">${backorder.logisticCode }</span>
	                            </c:if>
	                            <span class="span2" style="color: red;margin-left: 30px">回收价：<fmt:formatNumber value="${backorder.payment }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></span>
	                            <c:if test="${backorder.status==1||backorder.status==2 } ">
	                            	<button type="button" class="but3" onclick="delebackorder('${backorder.oid }',this)">删除订单</button>
	                            </c:if>
	                            <c:if test="${backorder.status==1 }">
			                    	<button type="button" class="but2" style="width: 140px;cursor: default;">等待商家确定金额</button>
			                    </c:if>
			                    <c:if test="${backorder.status==2 }">
			                    	<button type="button" class="but2" style="cursor: default; width: 150px">商家已付款，请查收</button>
			                    </c:if>
			                    <span>
				                    <c:if test="${backorder.status==3 }">
				                    	<button id="assess" type="button" class="but2" onclick="assess('${backorder.oid }',this)">确定金额</button>
				                    </c:if>
				                </span>
			                    <c:if test="${backorder.status==4 }">
			                    	<button type="button" class="but2" style="width: 100px;cursor: default;">等待商家付款</button>
			                    </c:if>			                    
	                        </p>
	                        <div class="shangpin">
	                            <div class="shangpin1">
	                                <a href="toAssessValue?id=${backorder.back_id }"><img src="${backorder.filePath }" alt=""></a>
	                            </div>
	                            <div class="shangpin2">
	                                <p style="font-size: 16px">${backorder.model }</p>
	                            </div>	                          
	                            <div class="shangpin2" style="width: 250px;height: 100px">
	                                <p style="font-size: 16px">${backorder.back_assess }</p>
	                            </div>
	                            <c:if test="${backorder.back_way==1 }">
		                            <div class="shangpin2">
		                                <p style="font-size: 16px">门店回收</p>
		                            </div>
	                            </c:if>
	                            <c:if test="${backorder.back_way==2 }">
		                            <div class="shangpin2">
		                                <p style="font-size: 16px">上门回收</p>
		                            </div>
	                            </c:if>
	                            <c:if test="${backorder.back_way==3 }">
		                            <div class="shangpin2">
		                                <p style="font-size: 16px">快递回收</p>
		                            </div>
	                            </c:if>
	                            <c:if test="${backorder.back_way==4 }">
		                            <div class="shangpin2">
		                                <p style="font-size: 16px">自寄快递</p>
		                            </div>
	                            </c:if>
	                            <c:if test="${backorder.status==1 }">
	                            	<div class="shangpin2" style="font-size: 16px;width: 160px;margin-left: 70px;color: red">
	                            		待商家收到商品与您确定价格后再确认金额
	                            	</div>
                            	</c:if>			                            
	                            <c:if test="${backorder.status==2 }">
		                            <div class="shangpin2">
		                                <button id="bot" class="bot" style="font-size: 16px;width: 50px;height: 30px;background: #fcdb00">评价</button>(文本框右下角可拖动)
		                                <div id="ping" class="ping" style="display: none;">
		                                    <textarea rows="" cols="" name="evaluate"></textarea>
		                                    <button id="" class="pingjia" style="font-size: 16px" onclick="backpingjia(${backorder.back_id},this)">确定</button>
		                                </div>
		                            </div>
		                       </c:if>
	                        </div>	                        
	                    </li>	                    
	                </c:forEach>	                
                </ul>
            </div>
            <div class="qwer">
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66;margin-left: 460px">共${map.pageinfobackorder.pages }页</a>
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66">第${map.pageinfobackorder.pageNum }页</a>
				<c:choose>
					<c:when test="${map.pageinfobackorder.pageNum==1||map.pageinfobackorder.pageNum==0}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfobackorder.prePage}&ul=3"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${map.pageinfobackorder.pageNum==map.pageinfobackorder.pages}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfobackorder.nextPage}&ul=3"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:otherwise>
				</c:choose>
            </div>
        </div>
        <div class="daohang4">
            <div class="daohang4_1">
                <ul>
                	<c:forEach items="${map.pageinfoleaseorder.list }" var="leaseorder">
	                    <li>
	                        <p class="p1">
	                            <span class="span1"><fmt:formatDate value="${leaseorder.createtime }" pattern="yyyy-MM-dd HH:mm:ss" /></span>
	                            <span class="span2">订单号：${leaseorder.oid }</span>	
	                            <span style="color: #ccc;margin-left: 40px">物流单号：</span><span class="span2" style="margin-left: 0px;cursor: pointer;" onclick="logistics('物流信息','logistics?logisticCode=',this)">${leaseorder.logisticCode }</span>
	                            <span class="span2" style="color: red;margin-left: 30px">总价：<fmt:formatNumber value="${leaseorder.payment }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></span>
	                            <c:if test="${leaseorder.status==1||leaseorder.ghm==2 }">
	                            	<button type="button" class="but3" onclick="deleleaseorder('${leaseorder.oid }',this)">删除订单</button>
	                            </c:if>
	                            <c:if test="${leaseorder.status==1 }">
			                    	<a href="nonpayment_pay?oid=${leaseorder.oid }&payments=${leaseorder.payment }"><button type="button" class="but2">付款</button></a>
			                    </c:if>
	                        </p>
	                        <div class="shangpin">
	                        	<div class="shangpin1">
	                                <a href="zulinxq?rid=${leaseorder.rid }"><img src="${leaseorder.img }" alt=""></a>
	                            </div>
	                            <div class="shangpin2" style="margin-left: 30px">
	                                <p style="font-size: 16px">${leaseorder.combo_name }<br/>价格：<fmt:formatNumber value="${leaseorder.danjia }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber><br/>折扣：${leaseorder.zheko }</p>
	                            </div>	                          
	                            <div class="shangpin2" style="margin-left: 0px">
	                                <p style="font-size: 16px">显示器：<br/>${leaseorder.xiansp }<br/>价格：<fmt:formatNumber value="${leaseorder.xsqj }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
	                            </div>
	                            <div class="shangpin2" style="margin-left: 0px;width: 100px">
	                                <p style="font-size: 16px">押金：<br/><fmt:formatNumber value="${leaseorder.yaj }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
	                            </div>
	                            <div class="shangpin2" style="margin-left: 0px;width: 100px">
	                                <p style="font-size: 16px">数量：${leaseorder.num }</p>
	                            </div>
	                            <div class="shangpin2" style="margin-left: 0px">
	                                <p style="font-size: 16px">租赁时间：${leaseorder.time }</p>
	                            </div>	                            
	                            <c:if test="${leaseorder.status==2&&(leaseorder.logisticCode==null||leaseorder.logisticCode=='') }">
	                            	<div class="shangpin2" style="font-size: 16px;width: 100px;margin-left: 0px;color: red">
	                            		未发货
	                            	</div>
                            	</c:if>
                            	<c:if test="${leaseorder.status==2&&(leaseorder.logisticCode!=null&&leaseorder.logisticCode!='') }">
	                            	<div class="shangpin2" style="font-size: 16px;width: 100px;margin-left: 0px;color: lime;">
	                            		已发货
	                            	</div>
                            	</c:if>
                            	<c:if test="${leaseorder.status==2 }">
		                            <div class="shangpin2" style="margin-left: 0px;width: 90px">
		                                <p style="font-size: 16px">归还时间：<br/><fmt:formatDate value="${leaseorder.ghtime }" type="both" /></p>
		                            </div>		                            
	                            </c:if>
	                            <c:set var="now" value="<%=new Date() %>"></c:set>
	                            <c:if test="${(now.time<leaseorder.ghtime.time)&&(leaseorder.logisticCode!=null&&leaseorder.logisticCode!='') }">
	                            	<div class="shangpin2" style="margin-left: 20px;width: 50px">
	                                	<p style="font-size: 16px;">归还时间未到</p>
	                            	</div>
		                        </c:if>
	                            <c:if test="${(now>=leaseorder.ghtime&&leaseorder.ghm==1)&&(leaseorder.logisticCode!=null&&leaseorder.logisticCode!='') }">
	                            	<div class="shangpin2" style="margin-left: 20px;width: 50px">
	                                	<p style="font-size: 16px;color: red">未归还</p>
	                            	</div>
		                        </c:if>
		                        <c:if test="${(now.time>=leaseorder.ghtime.time&&leaseorder.ghm==2)&&(leaseorder.logisticCode!=null&&leaseorder.logisticCode!='') }">
	                            	<div class="shangpin2" style="margin-left: 20px;width: 50px">
	                                	<p style="font-size: 16px;color: lime;">已归还</p>
	                            	</div>
		                        </c:if>			                            
	                        </div>	                        
	                    </li>	                    
	                </c:forEach>	                
                </ul>
            </div>
            <div class="qwer">
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66;margin-left: 460px">共${map.pageinfoleaseorder.pages }页</a>
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66">第${map.pageinfoleaseorder.pageNum }页</a>
				<c:choose>
					<c:when test="${map.pageinfoleaseorder.pageNum==1||map.pageinfoleaseorder.pageNum==0}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfoleaseorder.prePage}&ul=4"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${map.pageinfoleaseorder.pageNum==map.pageinfoleaseorder.pages}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfoleaseorder.nextPage}&ul=4"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:otherwise>
				</c:choose>
            </div>
        </div>
        <div class="daohang5">
            <div class="daohang5_1">
                <ul>
                	<c:forEach items="${map.pageinfobiddingorder.list }" var="biddingorder">
                		<div id="onebiddingorder">
		                    <li>
		                        <p class="p1">
		                        	<span class="span1">竞价商品</span>
		                        	<c:if test="${biddingorder.re_status==3&&(biddingorder.bidOrder.oid==null||biddingorder.bidOrder.oid=='') }">	                            
		                            	<button type="button" class="but3" onclick="delebiddingorder('${biddingorder.bidOrder.oid }','${biddingorder.bid}',this)">删除订单</button>
		                        	</c:if>
		                        	<c:if test="${biddingorder.re_status==3&&(biddingorder.bidOrder.logisticCode!=null&&biddingorder.bidOrder.logisticCode!='') }">	                            
		                            	<button type="button" class="but3" onclick="delebiddingorder('${biddingorder.bidOrder.oid }','${biddingorder.bid}',this)">删除订单</button>
		                        	</c:if>
		                        	<c:if test="${biddingorder.bidOrder.status==1 }">
				                    	<a href="nonpayment_pay?oid=${biddingorder.bidOrder.oid }&payments=${biddingorder.bidOrder.payment }"><button type="button" class="but2">付款</button></a>
				                    </c:if>
		                        </p>
		                        <div class="shangpin">
		                            <div class="shangpin1">
		                                <img src="${biddingorder.img_url }" width="100px" alt="">
		                            </div>
		                            <div class="shangpin2">
		                                <p style="font-size: 16px">${biddingorder.bidname }</p>
		                            </div>	                          
		                            
		                            <div class="shangpin2" style="margin-left: 0px">
		                                <p style="font-size: 16px">${biddingorder.biddes }</p>
		                            </div>
		                            <div class="shangpin2" style="margin-left: 0px">
		                                <p style="font-size: 16px">最低竞价金额：<br/><fmt:formatNumber value="${biddingorder.lowprice }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
		                            </div>
		                            <div class="shangpin2" style="margin-left: 0px">
		                                <p style="font-size: 16px">所出价：<br/><fmt:formatNumber value="${biddingorder.bidprice }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
		                            </div>
		                            <c:if test="${biddingorder.re_status==1 }">
			                            <div class="shangpin2">
			                                <p style="font-size: 16px;color: red">请等待竞价结果</p>
			                            </div>
		                            </c:if>
		                            <c:if test="${biddingorder.re_status==3&&(biddingorder.bidOrder.oid!=null&&biddingorder.bidOrder.oid!='') }">
			                            <div class="shangpin2">
			                                <p style="font-size: 16px;color: lime;">竞价成功</p>
			                            </div>
		                            </c:if>
		                            <c:if test="${biddingorder.re_status==3&&(biddingorder.bidOrder.oid==null||biddingorder.bidOrder.oid=='') }">
			                            <div class="shangpin2">
			                                <p style="font-size: 16px;color: red">竞价失败</p>
			                            </div>
		                            </c:if>	                            
		                        </div>
		                        
		                        <c:if test="${biddingorder.bidOrder.oid!=null&&biddingorder.bidOrder.oid!='' }">
				                        <li>
					                        <p class="p1" style="border-top: thin;">
					                            <span class="span1"><fmt:formatDate value="${biddingorder.bidOrder.createtime }" type="both"/></span>
					                            <span class="span2">订单号：${biddingorder.bidOrder.oid }</span>	
					                            <span style="color: #ccc;margin-left: 40px">物流单号：</span><span class="span2" style="margin-left: 0px;cursor: pointer;" onclick="logistics('物流信息','logistics?logisticCode=',this)">${biddingorder.bidOrder.logisticCode }</span>
					                            <span class="span2" style="color: red;margin-left: 30px">最终价格：<fmt:formatNumber value="${biddingorder.bidOrder.payment }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></span>     				                    
					                        </p>
					                        <div class="shangpin">
					                            <div class="shangpin1">
					                                <img src="${biddingorder.img_url }" style="width: 100px" alt="">
					                            </div>
					                            <div class="shangpin2">
					                                <p style="font-size: 16px">${biddingorder.bidname }</p>
					                            </div>
					                            <div class="shangpin2">
					                                <p style="font-size: 16px">${biddingorder.biddes }</p>
					                            </div>	                          
					                            <div class="shangpin2">
					                                <p style="font-size: 16px">所出价：<br/><fmt:formatNumber value="${biddingorder.bidprice }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber></p>
					                            </div>
					                            <c:if test="${biddingorder.bidOrder.status==2&&(biddingorder.bidOrder.logisticCode==null||biddingorder.bidOrder.logisticCode=='') }">
						                            <div class="shangpin2">
						                                <p style="font-size: 16px; color: red">未发货</p>
						                            </div>			                            
					                        	</c:if>
					                        	<c:if test="${biddingorder.bidOrder.status==2&&(biddingorder.bidOrder.logisticCode!=null&&biddingorder.bidOrder.logisticCode!='') }">
						                            <div class="shangpin2">
						                                <p style="font-size: 16px; color: lime;">已发货</p>
						                            </div>			                            
					                        	</c:if>
					                        </div>	                        
					                    </li>				            	        
			                    </c:if>	                        
		                    </li>	                    
	                	</div>
	                </c:forEach>	                
                </ul>
            </div>
            <div class="qwer">
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66;margin-left: 460px">共${map.pageinfobiddingorder.pages }页</a>
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66">第${map.pageinfobiddingorder.pageNum }页</a>
				<c:choose>
					<c:when test="${map.pageinfobiddingorder.pageNum==1||map.pageinfobiddingorder.pageNum==0}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfobiddingorder.prePage}&ul=5"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${map.pageinfobiddingorder.pageNum==map.pageinfobiddingorder.pages}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfobiddingorder.nextPage}&ul=5"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:otherwise>
				</c:choose>
            </div>
        </div>
        <div class="daohang6">
            <div class="daohang6_1">
                <ul>
                	<c:forEach items="${map.pageinfoenterpriseBacks.list }" var="enterpriseBacks">
	                    <li>
	                        <p class="p1">
	                            <span class="span1"><fmt:formatDate value="${enterpriseBacks.addtime }" pattern="yyyy-MM-dd HH:mm:ss" /></span>	                            
	                            <span class="span2" style="color: red;margin-left: 600px">评估价：
	                            	<c:if test="${enterpriseBacks.price!=null&&enterpriseBacks.price!='' }">
	                            		<fmt:formatNumber value="${enterpriseBacks.price }" pattern="#.##" minFractionDigits="2"></fmt:formatNumber>
	                            	</c:if>
	                            </span>
	                            <c:if test="${enterpriseBacks.status==1 }">
	                            	<button type="button" class="but3" onclick="deleenterpriseBacks('${enterpriseBacks.id }',this)">删除订单</button>
	                            </c:if>	                            			                    
	                        </p>
	                        <div class="shangpin">
								<div class="shangpin2" style="margin-left: 80px">
	                                <p style="font-size: 16px">企业名称：<br/>${enterpriseBacks.companyname }</p>
	                            </div>
	                            <div class="shangpin2" style="width: 300px">
	                                <p style="font-size: 16px">回收物品：<br/>${enterpriseBacks.descripinfo }</p>
	                            </div>
	                            <div class="shangpin2">
	                                <p style="font-size: 16px">用户姓名：<br/>${enterpriseBacks.clientname }</p>
	                            </div>	                          
	                            <div class="shangpin2">
	                                <p style="font-size: 16px">联系电话：<br/>${enterpriseBacks.phone }</p>
	                            </div>
	                            <c:if test="${enterpriseBacks.status==0 }">
		                            <div class="shangpin2">
		                                <p style="font-size: 16px;color: red;">未受理</p>
		                            </div>
	                            </c:if>
	                            <c:if test="${enterpriseBacks.status==1 }">
		                            <div class="shangpin2">
		                                <p style="font-size: 16px;color: lime;">已受理</p>
		                            </div>
	                            </c:if>
	                        </div>	                        
	                    </li>	                    
	                </c:forEach>	                
                </ul>
            </div>
            <div class="qwer">
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66;margin-left: 460px">共${map.pageinfoenterpriseBacks.pages }页</a>
	            <a href="javascript:return false;"
					style="font-weight: bold; cursor: default; background-color: #ccff66">第${map.pageinfoenterpriseBacks.pageNum }页</a>
				<c:choose>
					<c:when test="${map.pageinfoenterpriseBacks.pageNum==1||map.pageinfoenterpriseBacks.pageNum==0}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfoenterpriseBacks.prePage}&ul=6"
							style="font-weight: bold;background-color: #fcdb00;">上一页</a>
					</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${map.pageinfoenterpriseBacks.pageNum==map.pageinfoenterpriseBacks.pages}">
						<a href="javascript:return false;"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:when>
					<c:otherwise>
						<a href="order?pageNum=${map.pageinfoenterpriseBacks.nextPage}&ul=6"
							style="font-weight: bold;background-color: #fcdb00;">下一页</a>
					</c:otherwise>
				</c:choose>
            </div>
        </div>       
     </div>
 </section>

    <!-- 底部 -->
		<jsp:include page="bottom.jsp" />
    
    
    <script type="text/javascript">
    
    	/* 出售订单删除 */
    function deleorder(oid,obj){
        layer.confirm('确认要删除吗？',{ btn: ["确定","取消"] },function(index){
           $.ajax({
                type: 'POST',
                url: 'deleorder',
                data:{oid:oid},
                dataType: 'json',
                success: function(val){
                	layer.close(index);
                if(val){
                		$(obj).parents(".oneorder").remove();
                		layer.msg("删除成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("删除失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
    	
    //删除购物车订单	
    function deleshopt(stid,obj){
    	layer.confirm('确认要删除吗？',{ btn: ["确定","取消"] },function(index){
            $.ajax({
                 type: 'POST',
                 url: 'deleshopt',
                 data:{stid:stid},
                 dataType: 'json',
                 success: function(val){
                 	layer.close(index);
                 if(val){
                 		$(obj).parents("tr").remove();
                 		layer.msg("删除成功",{icon: 1,time:2000});
                 	}else{
                 		layer.msg("删除失败",{icon: 2,time:2000});
                 	};               	
                 },
                 error:function(data) {
                     console.log(data.msg);
                 },
             });
         });
    }
    
  //确定金额	
    function assess(oid,obj){
    	layer.confirm('是否确定金额？',{ btn: ["确定","取消"] },function(index){
            $.ajax({
                 type: 'POST',
                 url: 'assess',
                 data:{oid:oid},
                 dataType: 'json',
                 success: function(val){
                 	layer.close(index);
                 if(val){
                 		$(obj).parent().append('<button type="button" class="but2" style="width: 100px;cursor: default;">等待商家付款</button>'); 
                 		$(obj).parent().find("#assess").remove();
                 		layer.msg("确定金额成功",{icon: 1,time:2000});
                 	}else{
                 		layer.msg("失败",{icon: 2,time:2000});
                 	};               	
                 },
                 error:function(data) {
                     console.log(data.msg);
                 },
             });
         });
    }
  
   
    /* 回收订单删除 */
    function delebackorder(oid,obj){
        layer.confirm('确认要删除吗？',{ btn: ["确定","取消"] },function(index){
           $.ajax({
                type: 'POST',
                url: 'delebackorder',
                data:{oid:oid},
                dataType: 'json',
                success: function(val){
                	layer.close(index);
                if(val){
                		$(obj).parents("li").remove();
                		layer.msg("删除成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("删除失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
    
    
    /* 企业回收删除 */
    function deleenterpriseBacks(id,obj){
        layer.confirm('确认要删除吗？',{ btn: ["确定","取消"] },function(index){
           $.ajax({
                type: 'POST',
                url: 'deleenterpriseBacks',
                data:{id:id},
                dataType: 'json',
                success: function(val){
                	layer.close(index);
                if(val){
                		$(obj).parents("li").remove();
                		layer.msg("删除成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("删除失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
    

    
    /* 出售商品评价 */
    function sellpingjia(i_id,cfid,obj){
    	   var pingluen=$(obj).parents(".shangpin4").find("[ name='evaluate']").val();
    	   $.ajax({
                type: 'POST',
                url: 'sellpingjia',
                data:{i_id:i_id,cfid:cfid,pingluen:pingluen},
                dataType: 'json',
                success: function(val){
                if(val){
                		$(obj).parents().find(".ping").hide();
                		layer.msg("评价成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("评价失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
    }
    
    /* 回收商品评价 */
    function backpingjia(back_id,obj){
    	var pingluen=$(obj).parents(".shangpin2").find("[ name='evaluate']").val();
           $.ajax({
                type: 'POST',
                url: 'backpingjia',
                data:{bid:back_id,gcontent:pingluen},
                dataType: 'json',
                success: function(val){
                if(val){
                		$(obj).parents().find(".ping").hide();
                		layer.msg("评价成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("评价失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
    }
    
    
    /*查看物流信息*/
    function logistics(title,url,obj){
       var LogisticCode=$(obj).html();
       var action=url+LogisticCode;
    		var index = layer.open({
                type: 2, 
                title: title,
                area: [1000+'px', 600 +'px'],
                shade:0.3,
                content:action
            });
    }
    
    
    /* 回收订单删除 */
    function  deleleaseorder(oid,obj){
        layer.confirm('确认要删除吗？',{ btn: ["确定","取消"] },function(index){
           $.ajax({
                type: 'POST',
                url: ' deleleaseorder',
                data:{oid:oid},
                dataType: 'json',
                success: function(val){
                	layer.close(index);
                if(val){
                		$(obj).parents("li").remove();
                		layer.msg("删除成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("删除失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
    		
   	
	/* 竞价订单删除 */
    function delebiddingorder(oid,bid,obj){
        layer.confirm('确认要删除吗？',{ btn: ["确定","取消"] },function(index){
           $.ajax({
                type: 'POST',
                url: ' delebiddingorder',
                data:{oid:oid,bid:bid},
                dataType: 'json',
                success: function(val){
                	layer.close(index);
                if(val){
                		$(obj).parents("#onebiddingorder").remove();
                		layer.msg("删除成功",{icon: 1,time:2000});
                	}else{
                		layer.msg("删除失败",{icon: 2,time:2000});
                	};               	
                },
                error:function(data) {
                    console.log(data.msg);
                },
            });
        });
    }
	
	//添加快递单号
    function zld_edit(title,url,oid,obj){
        var index = layer.open({
            type: 2,
            anim:3,
            title: title,
            area: [600+'px',300 +'px'],
            shade:0.2,
            content:url,
            end:function(){
            	$.ajax({
                    type: 'POST',
                    url: 'sellogisticCode',
                    data:{oid:oid},
                    dataType: 'json',
                    success: function(val){
                    	$(obj).parent("span").append('<span style="color: #ccc;margin-left: 40px">物流单号：</span><span class="span2" style="margin-left: 0px;cursor: pointer;" onclick="logistics(\'物流信息\',\'logistics?logisticCode=\',this)">'+val+'</span>');               	
                    	$(obj).parent("span").find("button").remove();
                    },
                    error:function(data) {
                        console.log(data.msg);
                    },
                });            	
            }
        });
        
    }
	</script>
</body>
</html>